<!--
 * @Author: your name
 * @Date: 2020-12-09 09:52:42
 * @LastEditTime: 2021-03-27 22:05:49
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \jun-bang-sheng-chan-guan-li-xi-tong\src\components\exception\ExceptionPage.vue
-->
<template>
  <div class="exception-page">
    <div class="img">
      <img :src="config[type].img" />
    </div>
    <div class="content">
      <h1>{{ config[type].title }}</h1>
      <div class="desc">{{ config[type].desc }}</div>
      <div class="action">
        <a-button type="primary" @click="RouterToHome"> 返回首页</a-button>
      </div>
    </div>
  </div>
</template>
<script>
import Config from "./typeConfig";

export default {
  name: "ExceptionPage",
  props: ["type"],
  data() {
    return {
      config: Config,
    };
  },

  methods: {
    RouterToHome() {
      this.$router.push({ path: "/home" });
    },
  },
};
</script>

<style lang="less" scoped>
.exception-page {
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: @base-bg-color;
  .img {
    padding-right: 52px;
    zoom: 1;
    img {
      max-width: 430px;
    }
  }
  .content {
    h1 {
      color: #434e59;
      font-size: 72px;
      font-weight: 600;
      line-height: 72px;
      margin-bottom: 24px;
    }
    .desc {
      color: @text-color-second;
      font-size: 20px;
      line-height: 28px;
      margin-bottom: 16px;
    }
  }
}
</style>
